<html>
<head><meta charset="utf-8"><title>Using cranelift backend? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html">Using cranelift backend?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226232587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226232587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226232587">(Feb 13 2021 at 07:42)</a>:</h4>
<p>I can't find any documentation on how to use cranelift backend. I've enabled it in config.toml. How do I make rustc use it instead of LLVM?</p>



<a name="226232666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226232666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226232666">(Feb 13 2021 at 07:45)</a>:</h4>
<p>change <code>codegen-backends=["llvm"]</code> in your <code>config.toml</code></p>



<a name="226232713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226232713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226232713">(Feb 13 2021 at 07:46)</a>:</h4>
<p>As I said, I already enabled it in config.toml. I currently have both LLVM and cranelift enabled.</p>



<a name="226232803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226232803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226232803">(Feb 13 2021 at 07:49)</a>:</h4>
<p>or <code>-Zcodegen-backend=cranelift</code> then</p>



<a name="226232877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226232877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226232877">(Feb 13 2021 at 07:51)</a>:</h4>
<p>Perfect, thanks</p>



<a name="226232933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226232933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226232933">(Feb 13 2021 at 07:53)</a>:</h4>
<p>fwiw these flags are documented: <a href="https://doc.rust-lang.org/unstable-book/compiler-flags/codegen-backend.html">https://doc.rust-lang.org/unstable-book/compiler-flags/codegen-backend.html</a></p>



<a name="226286519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226286519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226286519">(Feb 14 2021 at 05:10)</a>:</h4>
<p>Potentially relevant: <a href="https://blog.rust-lang.org/inside-rust/2020/11/15/Using-rustc_codegen_cranelift.html#building-in-tree">https://blog.rust-lang.org/inside-rust/2020/11/15/Using-rustc_codegen_cranelift.html#building-in-tree</a></p>



<a name="226329021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Using%20cranelift%20backend%3F/near/226329021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Using.20cranelift.20backend.3F.html#226329021">(Feb 14 2021 at 22:20)</a>:</h4>
<p>that was my first suggestion</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>